package com.ruoyi.merchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.OrderReviewsMapper;
import com.ruoyi.merchant.domain.OrderReviews;
import com.ruoyi.merchant.service.IOrderReviewsService;

/**
 * 订单评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-22
 */
@Service
public class OrderReviewsServiceImpl implements IOrderReviewsService 
{
    @Autowired
    private OrderReviewsMapper orderReviewsMapper;

    /**
     * 查询订单评价
     * 
     * @param reviewId 订单评价主键
     * @return 订单评价
     */
    @Override
    public OrderReviews selectOrderReviewsByReviewId(String reviewId)
    {
        return orderReviewsMapper.selectOrderReviewsByReviewId(reviewId);
    }

    /**
     * 查询订单评价列表
     * 
     * @param orderReviews 订单评价
     * @return 订单评价
     */
    @Override
    public List<OrderReviews> selectOrderReviewsList(OrderReviews orderReviews)
    {
        return orderReviewsMapper.selectOrderReviewsList(orderReviews);
    }

    /**
     * 新增订单评价
     * 
     * @param orderReviews 订单评价
     * @return 结果
     */
    @Override
    public int insertOrderReviews(OrderReviews orderReviews)
    {
        return orderReviewsMapper.insertOrderReviews(orderReviews);
    }

    /**
     * 修改订单评价
     * 
     * @param orderReviews 订单评价
     * @return 结果
     */
    @Override
    public int updateOrderReviews(OrderReviews orderReviews)
    {
        return orderReviewsMapper.updateOrderReviews(orderReviews);
    }

    /**
     * 批量删除订单评价
     * 
     * @param reviewIds 需要删除的订单评价主键
     * @return 结果
     */
    @Override
    public int deleteOrderReviewsByReviewIds(String[] reviewIds)
    {
        return orderReviewsMapper.deleteOrderReviewsByReviewIds(reviewIds);
    }

    /**
     * 删除订单评价信息
     * 
     * @param reviewId 订单评价主键
     * @return 结果
     */
    @Override
    public int deleteOrderReviewsByReviewId(String reviewId)
    {
        return orderReviewsMapper.deleteOrderReviewsByReviewId(reviewId);
    }
}
